package com.lemon.pay.wechat;

/**
 * 常量
 */
public class WXPayConstants {

    public enum SignType {
        MD5, HMACSHA256
    }
    
    /**
     * 交易类型.
     */
    public static class TradeType {
      /**
       * 原生扫码支付.
       */
      public static final String NATIVE = "NATIVE";

      /**
       * App支付.
       */
      public static final String APP = "APP";

      /**
       * 公众号支付.小程序支付
       */
      public static final String JSAPI = "JSAPI";

      /**
       * H5支付.
       */
      public static final String MWEB = "MWEB";

      /**
       * 刷卡支付.
       * 刷卡支付有单独的支付接口，不调用统一下单接口
       */
      public static final String MICROPAY = "MICROPAY";
    }

    public static final String FAIL     = "FAIL";
    public static final String SUCCESS  = "SUCCESS";
    public static final String HMACSHA256 = "HMAC-SHA256";
    public static final String MD5 = "MD5";

    public static final String FIELD_SIGN = "sign";
    public static final String FIELD_SIGN_TYPE = "sign_type";

    /**
     * 刷卡支付
     */
    public static final String MICROPAY_URL     = "https://api.mch.weixin.qq.com/pay/micropay";
    /**
     * 统一下单
     */
    public static final String UNIFIEDORDER_URL = "https://api.mch.weixin.qq.com/pay/unifiedorder";
    /**
     * 查询订单
     */
    public static final String ORDERQUERY_URL   = "https://api.mch.weixin.qq.com/pay/orderquery";
    /**
     * 撤销订单
     */
    public static final String REVERSE_URL      = "https://api.mch.weixin.qq.com/secapi/pay/reverse";
    /**
     * 关闭订单
     */
    public static final String CLOSEORDER_URL   = "https://api.mch.weixin.qq.com/pay/closeorder";
    /**
     * 申请退款
     */
    public static final String REFUND_URL       = "https://api.mch.weixin.qq.com/secapi/pay/refund";
    /**
     * 退款查询
     */
    public static final String REFUNDQUERY_URL  = "https://api.mch.weixin.qq.com/pay/refundquery";
    /**
     * 下载对账单
     */
    public static final String DOWNLOADBILL_URL = "https://api.mch.weixin.qq.com/pay/downloadbill";
    /**
     * 交易保障
     */
    public static final String REPORT_URL       = "https://api.mch.weixin.qq.com/payitil/report";
    /**
     * 转换短链接
     */
    public static final String SHORTURL_URL     = "https://api.mch.weixin.qq.com/tools/shorturl";
    /**
     * 授权码查询openid
     */
    public static final String AUTHCODETOOPENID_URL = "https://api.mch.weixin.qq.com/tools/authcodetoopenid";

    // sandbox
    public static final String SANDBOX_MICROPAY_URL     = "https://api.mch.weixin.qq.com/sandboxnew/pay/micropay";
    public static final String SANDBOX_UNIFIEDORDER_URL = "https://api.mch.weixin.qq.com/sandboxnew/pay/unifiedorder";
    public static final String SANDBOX_ORDERQUERY_URL   = "https://api.mch.weixin.qq.com/sandboxnew/pay/orderquery";
    public static final String SANDBOX_REVERSE_URL      = "https://api.mch.weixin.qq.com/sandboxnew/secapi/pay/reverse";
    public static final String SANDBOX_CLOSEORDER_URL   = "https://api.mch.weixin.qq.com/sandboxnew/pay/closeorder";
    public static final String SANDBOX_REFUND_URL       = "https://api.mch.weixin.qq.com/sandboxnew/secapi/pay/refund";
    public static final String SANDBOX_REFUNDQUERY_URL  = "https://api.mch.weixin.qq.com/sandboxnew/pay/refundquery";
    public static final String SANDBOX_DOWNLOADBILL_URL = "https://api.mch.weixin.qq.com/sandboxnew/pay/downloadbill";
    public static final String SANDBOX_REPORT_URL       = "https://api.mch.weixin.qq.com/sandboxnew/payitil/report";
    public static final String SANDBOX_SHORTURL_URL     = "https://api.mch.weixin.qq.com/sandboxnew/tools/shorturl";
    public static final String SANDBOX_AUTHCODETOOPENID_URL = "https://api.mch.weixin.qq.com/sandboxnew/tools/authcodetoopenid";

}